<template>
  <div class="dialog">
    <UploadView  ref="UploadViewRef"  ></UploadView>
    <div slot="footer" class="dialog-footer">
      <el-button type="success" @click="goUpload" size="small">上传</el-button>
      <el-button type="danger" @click="cancelUpload" size="small">取消</el-button>
    </div>
  </div>
</template>

<script>
import UploadView from "@/views/UploadView";

export default {
 /* props 路由组件传参 */
  props: {

  },
  data() {
    return {};
  },
  methods: {

    cancelUpload(msg) {
      this.$store.dispatch( 'changeUploadDialogVisableAction', false)
    },
    goUpload(){
      // 在父容器中触发 子组件的方法
      this.$refs.UploadViewRef.doUpload();
    }
  },
  components: {
    UploadView
  }
};
</script>

<style lang='scss' scoped>
.dialog {
  .dialog-footer {
    text-align: right;
  }
}
</style>
